home *** CD-ROM | disk | FTP | other *** search
- ; ENVPKG.ASM - Jim Kyle - July 1990
-
- .model small,c
-
- .data
- extrn _psp:word
-
- .code
-
- mstenvp proc
- public mstenvp
- ;char far * mstenvp(void);
- mov ax,352eh;
- int 21h;
- mov dx,es:[002ch];
- xor ax,ax;
- ret
- mstenvp endp
-
- envsiz proc oenv:word, senv:word
- public envsiz
- ; short envsiz(char far*vptr)
- mov ax,senv; segment of environment
- dec ax; back up to mcb
- mov es,ax
- mov ax,es:[0003h]; size in paragraphs
- ret;
- envsiz endp
-
- nxtevar proc uses di, vptr:far ptr byte
- public nxtevar
- ; char far * nxtevar(char far *vptr)
- les di,vptr;
- mov cx,8000h;
- xor ax,ax;
- mov dx,ax;
- repne scasb; search for 0
- inc cx; CX=8000h if only one 0 found
- js nev
- mov dx,es
- mov ax,di
- nev:
- ret
- nxtevar endp
- end